<template lang="pug">
  keep-alive
    kalix-table(bizKey="TrainingGenre" title='课程类别表' ref="kalixTable"
    v-bind:tableFields="tableFields"
    v-bind:targetURL="trainingGenreURL"
    v-bind:bizDialog="trainingGenreDialog"
    v-bind:btnList="trainingGenreBtnList"
    v-bind:buttonPermissionPrefix="buttonPermissionPrefix"
    v-bind:toolbarBtnList="toolbarBtnList"
    bizSearch="trainingGenreSearch")
</template>

<script type="text/ecmascript-6">
  import {trainingGenreURL, trainingGenreBtnPermissionPrefix} from '../../config.toml'
  import {trainingGenreConfigBtnList} from './config'
  import KalixTable from '../../../../../components/corelib/components/common/baseTable'

  export default {
    name: 'kalix-training-genres',
    components: {KalixTable},
    data() {
      return {
        trainingGenreURL: trainingGenreURL,
        tableFields: [
          {prop: 'name', label: '课程类别名称'},
          {prop: 'url', label: '类别封面'}
        ],
        trainingGenreDialog: [
          {id: 'add', dialog: 'trainingGenreAdd'},
          {id: 'edit', dialog: 'trainingGenreEdit'},
          {id: 'view', dialog: 'trainingGenreView'}
        ],
        trainingGenreBtnList: trainingGenreConfigBtnList,
        toolbarBtnList: [
          {id: 'add', isShow: true, title: '添加', icon: 'icon-pinleizengjia', isPermission: true}
        ],
        buttonPermissionPrefix: trainingGenreBtnPermissionPrefix
      }
    }
  }
</script>

<style scoped lang="stylus">

</style>
